import request from '@/utils/request';
import { stringify } from 'qs';

//获取提现明细分页列表
export async function getAccountDetailData(params) {
  return request(`/zjf-oms/payorder/withdrawalPage?${stringify(params)}`);
}

//获取充值明细分页列表
export async function getRechargeDetailData(params) {
  return request(`/zjf-oms/payorder/rechargePage?${stringify(params)}`);
}

//获取快递账单分页列表
export async function getWithdrawDetailData(params) {
  if(params.orderType == '1'){
    params.orderType = undefined;
    return request(`/zjf-oms/payorder/expressBillsPageNew?${stringify(params)}`);
  }else{
    params.orderType = undefined;
    return request(`/zjf-erp-spd/spdorder/userExpressOrdersNew?${stringify(params)}`);
  }
}

//首页获取所有的快递公司列表
export async function getIndexExpressList() {
  return request(`/blade-logistics/express/listAll`);
}

//店铺名称模糊
// export async function getIndexShopList() {
//   return request(`/zjf-erp-spd/spdPrint/fetchRemoteStoreList`);21
// }

// 查询平台店铺列表
export async function getIndexShopList(params) {
	const data = { current: 1, size: 100, ...params };
	return request(`/blade-goods/newSystem/ecStore/list/page`, {
		method: "POST",
		data: data
	});
}

//取消提现
export async function cancelWithdrawal(params) {
  return request(`/zjf-oms/payorder/cancelWithdrawal?${stringify(params)}`);
}
